package com.citycloud.datac.client.dto;

import org.springframework.util.Assert;

import com.citycloud.datac.client.cache.CacheManager;
import com.citycloud.datac.client.token.ResourceServerTokenServices;

public class ResourceServerConfigurer {
	private ResourceServerTokenServices resourceTokenServices;
	private CacheManager cacheManager;

	public ResourceServerConfigurer tokenServices(ResourceServerTokenServices tokenServices) {
		Assert.state(tokenServices != null, "ResourceServerTokenServices cannot be null");
		this.resourceTokenServices = tokenServices;
		return this;
	}

	public ResourceServerConfigurer cacheManager(CacheManager cacheManager) {
		Assert.state(cacheManager != null, "ResourceServerTokenServices cannot be null");
		this.cacheManager = cacheManager;
		return this;
	}

	public ResourceServerTokenServices getResourceTokenServices() {
		return this.resourceTokenServices;
	}

	public CacheManager getCacheManager() {
		return this.cacheManager;
	}
}
